﻿<UserControl x:Class="Mnk.TBox.Plugins.Searcher.Settings"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:loc="clr-namespace:Mnk.TBox.Plugins.Searcher.Code.Localization"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
             xmlns:Units="clr-namespace:Mnk.Library.WpfControls.Components.Units;assembly=Mnk.Library.WPFControls"
             xmlns:captioned1="clr-namespace:Mnk.Library.WpfControls.Components.Captioned;assembly=Mnk.Library.WPFControls"
             xmlns:components="clr-namespace:Mnk.Library.WpfControls.Components;assembly=Mnk.Library.WPFControls"
             mc:Ignorable="d" 
             d:DesignHeight="300" d:DesignWidth="300">
    <DockPanel>
        <TabControl>
            <TabItem Header="{loc:Tr FilesAndFoldersToSearch}">
                <Grid>
                    <Grid.RowDefinitions>
                        <RowDefinition MinHeight="64"/>
                        <RowDefinition Height="5"/>
                        <RowDefinition MinHeight="64"/>
                    </Grid.RowDefinitions>
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition/>
                        <ColumnDefinition/>
                    </Grid.ColumnDefinitions>
                    <GroupBox Header="{loc:Tr FoldersToSearch}" Margin="5" Grid.ColumnSpan="2">
                        <Units:CheckableFileListBoxUnit ItemsSource="{Binding Index.FileNames}" UnitType="FolderPath" Title="{loc:Tr ConfigureFilesFoldersToCreateIndex}" PathGetterType="Folder"/>
                    </GroupBox>
                    <GridSplitter Grid.Row="1" Grid.ColumnSpan="2" ResizeDirection="Rows" HorizontalAlignment="Stretch"/>
                    <GroupBox Header="{loc:Tr FileTypesToInclude}" Margin="5" Grid.Row="2">
                        <Units:ListBoxUnit ItemsSource="{Binding Index.FileTypes}" UnitType="Text" Title="{loc:Tr ConfigureFilesTypesToCreateIndex}"/>
                    </GroupBox>
                    <GroupBox Header="{loc:Tr FileMasksToExclude}" Margin="5" Grid.Row="2" Grid.Column="1" >
                        <Units:ListBoxUnit ItemsSource="{Binding Index.FileMasksToExclude}" UnitType="Text" Title="{loc:Tr ConfigureFileMasksToExcludeUnusedItems}"/>
                    </GroupBox>
                </Grid>
            </TabItem>
            <TabItem Header="{loc:Tr Advanced}">
                <StackPanel>
                    <GroupBox Header="{loc:Tr FileParsing}" Margin="5">
                        <StackPanel>
                            <components:ExtCheckBox Content="{loc:Tr SkipComments}" Margin="5" IsChecked="{Binding Index.SkipComments}" />
                            <components:ExtCheckBox Content="{loc:Tr DecodeStrings}" Margin="5" IsChecked="{Binding Index.DecodeStrings}" />
                            <components:ExtCheckBox Content="{loc:Tr DecodeComments}" Margin="5" IsChecked="{Binding Index.DecodeComments}" />
                        </StackPanel>
                    </GroupBox>
                    <GroupBox Header="{loc:Tr SearchResultsView}" Margin="5">
                        <StackPanel Margin="5">
                            <components:ExtCheckBox Content="{loc:Tr LoadFileOnSelect}" DockPanel.Dock="Right" Margin="5" IsChecked="{Binding Result.AutoLoadFile}"/>
                            <captioned1:CaptionedEditPath Caption="{loc:Tr ExecutablePath}" Value="{Binding Result.OpenWith}" PathGetterType="File" PathGetterFilter="{loc:Tr ExecutableFileMasks}"/>
                        </StackPanel>
                    </GroupBox>
                    <GroupBox Header="{loc:Tr SearchableSymbols}" Margin="5">
                        <TextBox Text="{Binding Index.SearchableCharacters}" MinLines="3"  Margin="5" TextWrapping="WrapWithOverflow"/>
                    </GroupBox>
                </StackPanel>
            </TabItem>
        </TabControl>
    </DockPanel>
</UserControl>
